<template>
  <div class="container">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item>订单管理</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/orderList' }"
        ><span style='color:#666;font-weight:normal'>我的订单</span></el-breadcrumb-item
      >
      <el-breadcrumb-item :to="{ path: '/orderDetail',query:{
          orderId:this.$route.query.orderId,
          orderStatus:this.$route.query.orderStatus
      } }">交易记录</el-breadcrumb-item>
    </el-breadcrumb>

    <div class="table">
      <p>订单编号：</p>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column type='index' label="序号" width="50px"></el-table-column>
        <el-table-column prop="payId" label="微信支付订单号" min-width="100px"></el-table-column>
        <el-table-column prop="nickName" label="付款人"></el-table-column>
        <el-table-column prop="payMoney" label="支付金额"></el-table-column>
        <el-table-column prop="payStatus" label="支付状态"></el-table-column>
        <el-table-column  label="支付时间">
        <template slot-scope="scope">
            <span> {{ $moment(scope.row.createdTime)}}</span>
        </template>  
        </el-table-column>
        <el-table-column prop="payeeName" label="收款人"></el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
      this.axios.get("/order/order/pay/selectOrderPays?orderId=" + this.$route.query.orderId).then(res=>{
          console.log(res);
          if(res.code == 0){
            this.tableData = res.data;
          }else{
              this.$message.error(res.message)
          }
      })
  },
  methods() {

  },
};
</script>

<style scoped lang='scss'>
.table{
     margin:20px 0;
     background: #fff;
     padding:10px;
     border-radius: 5px;
    /deep/.el-table th > .cell{
         color:#666;
     }
}
</style>